function [mu covar] = recoverGaussian(sigmaPoints, muWeights, covarWeights)

[n d] = size(sigmaPoints);

mu = sum(sigmaPoints.*(muWeights(:)*ones(1, d)));
centredSigmaPoints = sigmaPoints - ones(n, 1)*mu;

covar = centredSigmaPoints'*diag(covarWeights)*centredSigmaPoints;
